Oracle® OLAP Analytic Workspace Java API Reference
10g Release 2 (10.2)

B14351-02

oracle.AWXML
Class Cube

java.lang.Object
  |
  +--oracle.AWXML.BaseObject
        |
        +--oracle.AWXML.AWObject
              |
              +--oracle.AWXML.Cube

public class Cube
extends AWObject

An AWObject that specifies an OLAP cube. A cube is logical organization of measures that are dimensioned by the same set of dimensions.

In the Oracle OLAP Analytic Workspace Java API object model, a Cube is owned by an AW object. For a description and diagram of the model hierarchy, see Object Hierarchy.

A Cube has associated CubeDimRef, Measure, and SolveDefinition objects. A Measure associated with a Cube can be a Measure, or a DerivedMeasure or an OlapMeasure, which are subclasses of Measure.

A CubeDimRef contains a reference to a Dimension. The Cube has a CubeDimRef for each Dimension associated with the Measure objects of the Cube. The Measure objects typically have fact data that is specified by the dimension members. The SolveDefinition objects contain information that affect operations that produce aggregated, allocated, or forecast data for a Measure.

If a CubeDimRef specifies that the Dimension it references is sparse, so that the isSparse method of the CubeDimRef returns true, then the analytic workspace internally creates a composite for each Measure. The analytic workspace uses the composites to store sparse data in a compact form.

By default, the analytic workspace creates a standard composite. If a Measure is extremely sparsely populated with data for one or more sets of dimension values, then you might want to specify using a compressed composite. You can use a compressed composite by specifying COMPRESSED as the value of the input parameter of the setSparseType method.

If the Measure objects of the Cube have similar amounts and patterns of sparsity, then they can share a standard composite. To use a shared standard composite, specify true as the input parameter of the setUseGlobalIndex method.

You can store the Measure data for a specific hierarchy and level in a separate partition in the Cube. Partitioning the data can improve the performance of some database tasks. You can use the setPartitionHierarchy and the setPartitionLevel methods to specify partitioning.

For a diagram of the model for data partitioning, see Data Partitioning for a Cube. For more information on composites and partitioning, see the Oracle OLAP Application Developer's Guide.

See Also:
Measure, CubeDimRef, SolveDefinition

Fields inherited from class oracle.AWXML.BaseObject
DATABASENULL

 

Constructor Summary
Cube()
          Creates a Cube.

 

Method Summary
 void addCubeDimRef(CubeDimRef input)
          Adds the specified dimension reference to the end of the list of dimension references associated with the Cube.
 void addCubeDimRefAfter(CubeDimRef input, BaseObject reference)
          Adds the specified CubeDimRef after the referenced CubeDimRef in the list of dimension references associated with the Cube.
 void addCubeDimRefBefore(CubeDimRef input, BaseObject reference)
          Adds the specified CubeDimRef before the referenced CubeDimRef in the list of dimension references associated with the Cube.
 void addCubeDimRefFirst(CubeDimRef input)
          Adds the specified dimension reference to the beginning of the list of dimension references associated with the Cube.
 void addDerivedMeasure(DerivedMeasure input)
          Adds the specified DerivedMeasure to the Cube.
 void addMeasure(Measure input)
          Adds the specified Measure to the measures associated with the Cube.
 void addOlapMeasure(OlapMeasure input)
          Adds the specified OlapMeasure to the Cube.
 void addSolveDefinition(SolveDefinition input)
          Adds the specified SolveDefinition to the Cube.
 java.lang.String Alter(AWConnection connection)
          Alters the Cube in the current analytic workspace.
 java.lang.String Create(AWConnection connection)
          Creates the Cube in the current analytic workspace of the specified database connection.
 AggregationDefinition createAggregationDefinition()
          Creates an AggregationDefinition and adds it to the Cube.
 AllocationDefinition createAllocationDefinition()
          Creates an AllocationDefinition and adds it to the Cube.
 CubeDimRef createCubeDimRef()
          Creates a CubeDimRef and adds it to the end of the list of dimension references associated with the Cube.
 CubeDimRef createCubeDimRefAfter(CubeDimRef input)
          Creates a CubeDimRef and adds it after the specified CubeDimRef in the list of dimension references associated with the Cube.
 CubeDimRef createCubeDimRefBefore(CubeDimRef input)
          Creates a CubeDimRef and adds it before the specified CubeDimRef in the list of dimension references associated with the Cube.
 CubeDimRef createCubeDimRefFirst()
          Creates a CubeDimRef and adds it the beginning of the list of dimension references associated with the Cube.
 DerivedMeasure createDerivedMeasure()
          Creates a DerivedMeasure and adds it to the Cube.
 ForecastDefinition createForecastDefinition()
          Creates a ForecastDefinition and adds it to the Cube.
 Measure createMeasure()
          Creates a Measure and adds it to the Cube.
 OlapMeasure createOlapMeasure()
          Creates an OlapMeasure and adds it to the Cube.
 java.lang.String Delete(AWConnection connection)
          Deletes the Cube in the current analytic workspace of the specified database connection.
 AggregationDefinition findAggregationDefinition(java.lang.String name)
          Gets the specified AggregationDefinition associated with the Cube.
 AllocationDefinition findAllocationDefinition(java.lang.String name)
          Gets the specified AllocationDefinition associated with the Cube.
 Measure findDerivedMeasure(java.lang.String input)
          Gets the specified DerivedMeasure associated with the Cube.
 ForecastDefinition findForecastDefinition(java.lang.String name)
          Gets the specified ForecastDefinition associated with the Cube.
 Measure findMeasure(java.lang.String input)
          Gets the specified Measure associated with the Cube.
 java.lang.String getAutoSolve()
          Indicates whether the analytic workspace automatically calculates the aggregate values of the Measure objects (solves the measures) owned by the Cube when it builds the Cube.
 java.util.Vector getCubeDimRefs()
          Gets the list of the dimension references associated with the Cube.
 AggregationDefinition getDefaultAggregationDefinition()
          Gets the default AggregationDefinition, which specifies the aggregation rules for the Cube.
 java.lang.String getDefaultDataType()
          Gets the default data type of the Measure objects in the Cube.
 java.util.Vector getDerivedMeasures()
          Gets a list of the DerivedMeasure objects associated with the Cube.
 java.lang.String getId()
          Gets the identifier of the Cube.
 java.util.Vector getMeasures()
          Gets a list of the Measure objects associated with the Cube.
 Hierarchy getPartitionHierarchy()
          Gets the partition Hierarchy for the Cube.
 Level getPartitionLevel()
          Gets the partition level for the Cube.
 java.util.Vector getSolveDefinitions()
          Gets the SolveDefinition objects owned by the Cube.
 java.lang.String getSparseType()
          Gets the type of composite that the analytic workspace uses to manage sparsity within the Cube.
 java.lang.Boolean getUseGlobalIndex()
          Gets a Boolean that indicates whether the analytic workspace uses the same composite to store the data for all of the Measure objects that are owned by the Cube.
 void readAWDefinitions(AWConnection connection, boolean readType)
          Reads the objects owned by the Cube into memory, making them available for processing within the current analytic workspace of the specified database connection.
 void removeCubeDimRef(CubeDimRef input)
          Removes the specified dimension reference from the list of dimension references associated with the Cube.
 void removeDerivedMeasure(DerivedMeasure input)
          Removes the specified DerivedMeasure from the Cube.
 void removeMeasure(Measure input)
          Removes the specified Measure from the Cube.
 void removeOlapMeasure(OlapMeasure input)
          Removes the specified OlapMeasure from the Cube.
 void removeSolveDefinition(SolveDefinition input)
          Removes the specified SolveDefinition from the Cube.
 void setAutoSolve(java.lang.String input)
          Specifies whether the analytic workspace automatically calculates the aggregate values of the Measure objects (solves the measures) owned by the Cube when it builds the Cube.
 void setDefaultAggregationDefinition(AggregationDefinition input)
          Specifies the default AggregationDefinition, which contains the aggregation rules for the Cube.
 void setDefaultDataType(java.lang.String input)
          Specifies a default data type for the Measure objects in the Cube.
 void setPartitionHierarchy(Hierarchy input)
          Specifies a partition hierarchy for the Cube.
 void setPartitionLevel(Level input)
          Specifies a partition level for the Cube.
 void setSparseType(java.lang.String input)
          Specifies the type of composite that the analytic workspace uses to manage sparsity within the Cube.
 void setUseGlobalIndex(java.lang.Boolean input)
          Specifies whether to use the same standard composite for all of the Measure objects owned by the Cube.
 java.lang.String WriteToXML()
          Gets an XML representation of the Cube.

 

Methods inherited from class oracle.AWXML.AWObject
addAttribute, addAttributeProjection, addSourceCubeMapGroup, addSourceDimensionMapGroup, addSourceMappingGroup, createAttribute, createAttributeProjection, createSourceCubeMapGroup, createSourceDimensionMapGroup, getAttributes, getSourceMapGroup, removeAttribute, removeAttributeProjection, removeAttributeProjection, removeSourceMappingGroup

 

Methods inherited from class oracle.AWXML.BaseObject
CreateAfter, CreateBefore, CreateFirst, DataRead, getColumnName, getLongName, getLongName, getName, getOwner, getPluralName, getPluralName, getSchema, getShortName, getShortName, setColumnName, setLongName, setLongName, setName, setPluralName, setPluralName, setSchema, setShortName, setShortName

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

Cube

public Cube()
Creates a Cube.

Method Detail

getId

public java.lang.String getId()
Gets the identifier of the Cube. The identifier is the full name of the Cube in the format name.type. For example, the identifier of a Cube with the name UNITS_CUBE_AW is UNITS_CUBE_AW.CUBE.

For more information on object identifiers, see Object Identifiers.

Overrides:
getId in class BaseObject
Returns:
A String that contains the identifier of the Cube.

setDefaultAggregationDefinition

public void setDefaultAggregationDefinition(AggregationDefinition input)
Specifies the default AggregationDefinition, which contains the aggregation rules for the Cube.
Parameters:
input - The AggregationDefinition to use as the default set of aggregation rules.

getDefaultAggregationDefinition

public AggregationDefinition getDefaultAggregationDefinition()
Gets the default AggregationDefinition, which specifies the aggregation rules for the Cube.
Returns:
The default AggregationDefinition.

getDefaultDataType

public java.lang.String getDefaultDataType()
Gets the default data type of the Measure objects in the Cube. Unless you have specified a default data type with the setDefaultDataType method, the Cube does not have a default data type.
Returns:
The name of the default data type or NULL if no default data type has been specified.

setDefaultDataType

public void setDefaultDataType(java.lang.String input)
Specifies a default data type for the Measure objects in the Cube. The Cube does not have a default data type unless you explicitly specify it. The possible data types are INTEGER, DECIMAL, NUMBER, and TEXT.
Parameters:
input - The data type to use as the default.

setAutoSolve

public void setAutoSolve(java.lang.String input)
Specifies whether the analytic workspace automatically calculates the aggregate values of the Measure objects (solves the measures) owned by the Cube when it builds the Cube. When it automatically solves the measures, the analytic workspace uses the default AggregationDefinition of the Cube.

The build process is initiated by the Execute method of the AWAction.BuildDatabase class.

Parameters:
input - A String that is YES to specify that the analytic workspace automatically solves the measures or NO to specify that it does not automatically solve them.

getAutoSolve

public java.lang.String getAutoSolve()
Indicates whether the analytic workspace automatically calculates the aggregate values of the Measure objects (solves the measures) owned by the Cube when it builds the Cube.
Returns:
A String that is YES to indicate that the analytic workspace automatically solves the measures or NO to indicate that that it does not automatically solve them.

WriteToXML

public java.lang.String WriteToXML()
Gets an XML representation of the Cube.
Overrides:
WriteToXML in class AWObject
Returns:
A String that is an XML representation of the Cube.

addCubeDimRef

public void addCubeDimRef(CubeDimRef input)
Adds the specified dimension reference to the end of the list of dimension references associated with the Cube.
Parameters:
input - The CubeDimRef to add to the list of dimension references for the Cube.

addCubeDimRefAfter

public void addCubeDimRefAfter(CubeDimRef input,
                               BaseObject reference)
Adds the specified CubeDimRef after the referenced CubeDimRef in the list of dimension references associated with the Cube.
Parameters:
input - The CubeDimRef to add to the list of dimension references for the Cube.
reference - The CubeDimRef after which to add the specified CubeDimRef.

addCubeDimRefBefore

public void addCubeDimRefBefore(CubeDimRef input,
                                BaseObject reference)
Adds the specified CubeDimRef before the referenced CubeDimRef in the list of dimension references associated with the Cube.
Parameters:
input - The CubeDimRef to add to the list of dimension references for the Cube.
reference - The CubeDimRef before which to add the specified CubeDimRef.

addCubeDimRefFirst

public void addCubeDimRefFirst(CubeDimRef input)
Adds the specified dimension reference to the beginning of the list of dimension references associated with the Cube.
Parameters:
input - The CubeDimRef to add to the list of dimension references for the Cube.

removeCubeDimRef

public void removeCubeDimRef(CubeDimRef input)
Removes the specified dimension reference from the list of dimension references associated with the Cube.
Parameters:
input - The CubeDimRef to remove from the list of dimension references for the Cube.

getCubeDimRefs

public java.util.Vector getCubeDimRefs()
Gets the list of the dimension references associated with the Cube.
Returns:
A Vector that contains the CubeDimRef objects associated with the Cube.

addMeasure

public void addMeasure(Measure input)
Adds the specified Measure to the measures associated with the Cube.
Parameters:
input - The Measure to add to the Cube.

removeMeasure

public void removeMeasure(Measure input)
Removes the specified Measure from the Cube.
Parameters:
input - The Measure to remove from the Cube.

getMeasures

public java.util.Vector getMeasures()
Gets a list of the Measure objects associated with the Cube.
Returns:
A Vector that contains the Measure objects associated with the Cube.

addOlapMeasure

public void addOlapMeasure(OlapMeasure input)
Adds the specified OlapMeasure to the Cube.
Parameters:
input - The OlapMeasure to add.

removeOlapMeasure

public void removeOlapMeasure(OlapMeasure input)
Removes the specified OlapMeasure from the Cube.
Parameters:
input - The OlapMeasure to remove.

addDerivedMeasure

public void addDerivedMeasure(DerivedMeasure input)
Adds the specified DerivedMeasure to the Cube.
Parameters:
input - The DerivedMeasure to add.

removeDerivedMeasure

public void removeDerivedMeasure(DerivedMeasure input)
Removes the specified DerivedMeasure from the Cube.
Parameters:
input - The DerivedMeasure to remove.

getDerivedMeasures

public java.util.Vector getDerivedMeasures()
Gets a list of the DerivedMeasure objects associated with the Cube.
Returns:
A Vector that contains the DerivedMeasure objects associated with the Cube.

setSparseType

public void setSparseType(java.lang.String input)
Specifies the type of composite that the analytic workspace uses to manage sparsity within the Cube. The types of composite are standard and compressed. The default is standard. If a Measure is extremely sparsely populated with data for one or more sets of dimension values, then you might want to specify using a compressed composite.

If the isSparse method of a CubeDimRef of the Cube specifies true, then the analytic workspace internally creates a composite for each Measure. If more than one referenced Dimension is sparse, then the sparse Dimension objects must be contiguous in the list of Dimension objects for the Cube.

By default the analytic workspace creates a separate standard composite for each Measure owned by the Cube. If the Measure objects of the Cube have similar amounts and patterns of sparsity, then they can share a standard composite. To use a shared standard composite, specify true as the input parameter of the setUseGlobalIndex method.

Parameters:
input - A String that contains STANDARD or COMPRESSED.

getSparseType

public java.lang.String getSparseType()
Gets the type of composite that the analytic workspace uses to manage sparsity within the Cube. The types are standard and compressed composites.
Returns:
A String that contains STANDARD or COMPRESSED.

createMeasure

public Measure createMeasure()
Creates a Measure and adds it to the Cube.
Returns:
The new Measure.

createDerivedMeasure

public DerivedMeasure createDerivedMeasure()
Creates a DerivedMeasure and adds it to the Cube.
Returns:
The new DerivedMeasure.

createOlapMeasure

public OlapMeasure createOlapMeasure()
Creates an OlapMeasure and adds it to the Cube.
Returns:
The new OlapMeasure.

createCubeDimRef

public CubeDimRef createCubeDimRef()
Creates a CubeDimRef and adds it to the end of the list of dimension references associated with the Cube.
Returns:
The new CubeDimRef.

createCubeDimRefAfter

public CubeDimRef createCubeDimRefAfter(CubeDimRef input)
Creates a CubeDimRef and adds it after the specified CubeDimRef in the list of dimension references associated with the Cube.
Parameters:
input - The CubeDimRef after which to add the new CubeDimRef.
Returns:
The new CubeDimRef.

createCubeDimRefBefore

public CubeDimRef createCubeDimRefBefore(CubeDimRef input)
Creates a CubeDimRef and adds it before the specified CubeDimRef in the list of dimension references associated with the Cube.
Parameters:
input - The CubeDimRef before which to add the new CubeDimRef.
Returns:
The new CubeDimRef.

createCubeDimRefFirst

public CubeDimRef createCubeDimRefFirst()
Creates a CubeDimRef and adds it the beginning of the list of dimension references associated with the Cube.
Returns:
The new CubeDimRef.

Create

public java.lang.String Create(AWConnection connection)
Creates the Cube in the current analytic workspace of the specified database connection. If it cannot create the Cube, then this method throws an AWException exception.
Overrides:
Create in class BaseObject
Parameters:
connection - The AWConnection that represents the database connection.
Returns:
A String that contains success if the method creates the Cube.

Alter

public java.lang.String Alter(AWConnection connection)
Alters the Cube in the current analytic workspace. If it cannot successfully alter the Cube, then this method throws an AWException exception.
Overrides:
Alter in class BaseObject
Parameters:
connection - The AWConnection that represents the database connection.
Returns:
A String that contains success if the method alters the Measure.

Delete

public java.lang.String Delete(AWConnection connection)
Deletes the Cube in the current analytic workspace of the specified database connection. If it cannot delete the Cube, then this method throws an AWException exception.
Overrides:
Delete in class BaseObject
Parameters:
connection - The AWConnection that represents the database connection.
Returns:
A String that contains success if the method deletes the Cube.

findMeasure

public Measure findMeasure(java.lang.String input)
Gets the specified Measure associated with the Cube.
Parameters:
input - The name of a Measure.
Returns:
The Measure named.

findDerivedMeasure

public Measure findDerivedMeasure(java.lang.String input)
Gets the specified DerivedMeasure associated with the Cube.
Parameters:
input - The name of a DerivedMeasure.
Returns:
The Measure named.

setPartitionHierarchy

public void setPartitionHierarchy(Hierarchy input)
Specifies a partition hierarchy for the Cube. If you specify a partition hierarchy but do not specify a partition level, then the analytic workspace stores all of the data for each dimension member in the hierarchy in a separate partition in the database. Use the setPartitionLevel method to restrict the data in the partition to a single level within the partition hierarchy.
Parameters:
input - The Hierarchy to use as the partition Hierarchy.

getPartitionHierarchy

public Hierarchy getPartitionHierarchy()
Gets the partition Hierarchy for the Cube.
Returns:
The partition Hierarchy.

setPartitionLevel

public void setPartitionLevel(Level input)
Specifies a partition level for the Cube. The partition level identifies a level within the partition hierarchy. The analytic workspace stores in a separate partition in the database all of the data for each dimension member in the partition level and in the levels that are children of the partition level.

For example, you could choose to partition a Cube by region (the REGION_AW Level within the SHIPMENTS_ROLLUP_AW Hierarchy of the CUSTOMER_AW Dimension). The analytic workspace would store all of the data for each region in a single partition. It would also store in that partition all of the data for the WAREHOUSE_AW and SHIP_TO_AW levels, which are children of the REGION_AW level.

Parameters:
input - The Level to use as the partition Level.

getPartitionLevel

public Level getPartitionLevel()
Gets the partition level for the Cube.
Returns:
The partition Level.

setUseGlobalIndex

public void setUseGlobalIndex(java.lang.Boolean input)
Specifies whether to use the same standard composite for all of the Measure objects owned by the Cube. By default, each Measure has its own composite. If the Measure objects of the Cube have similar amounts and patterns of sparsity, then they can share a standard composite.
Parameters:
input - A Boolean that contains true if you want all of the Measure objects owned by the Cube to share the same standard composite, or false if you want them to have separate composites.

getUseGlobalIndex

public java.lang.Boolean getUseGlobalIndex()
Gets a Boolean that indicates whether the analytic workspace uses the same composite to store the data for all of the Measure objects that are owned by the Cube. By default, each Measure has a separate composite.
Returns:
A Boolean that contains true if all of Measure objects share the same standard composite or false if they do not.

readAWDefinitions

public void readAWDefinitions(AWConnection connection,
                              boolean readType)
Reads the objects owned by the Cube into memory, making them available for processing within the current analytic workspace of the specified database connection.
Parameters:
connection - The AWConnection that specifies the database connection.
readType - A boolean that is true if you want to read into memory the Cube and all of objects owned by the Cube, or false if you want to read only the Cube with its dimensions and measures, but not to read other child objects.

createForecastDefinition

public ForecastDefinition createForecastDefinition()
Creates a ForecastDefinition and adds it to the Cube.
Returns:
The new ForecastDefinition.

createAllocationDefinition

public AllocationDefinition createAllocationDefinition()
Creates an AllocationDefinition and adds it to the Cube.
Returns:
The new AllocationDefinition.

createAggregationDefinition

public AggregationDefinition createAggregationDefinition()
Creates an AggregationDefinition and adds it to the Cube.
Returns:
The new AggregationDefinition.

addSolveDefinition

public void addSolveDefinition(SolveDefinition input)
Adds the specified SolveDefinition to the Cube.
Parameters:
input - The SolveDefinition to add.

removeSolveDefinition

public void removeSolveDefinition(SolveDefinition input)
Removes the specified SolveDefinition from the Cube.
Parameters:
input - The SolveDefinition to remove.

getSolveDefinitions

public java.util.Vector getSolveDefinitions()
Gets the SolveDefinition objects owned by the Cube.
Returns:
A Vector of SolveDefinition objects.

findAggregationDefinition

public AggregationDefinition findAggregationDefinition(java.lang.String name)
Gets the specified AggregationDefinition associated with the Cube.
Parameters:
name - The name of the AggregationDefinition to find.
Returns:
The specified AggregationDefinition.

findAllocationDefinition

public AllocationDefinition findAllocationDefinition(java.lang.String name)
Gets the specified AllocationDefinition associated with the Cube.
Parameters:
name - The name of the AllocationDefinition to find.
Returns:
The specified AllocationDefinition.

findForecastDefinition

public ForecastDefinition findForecastDefinition(java.lang.String name)
Gets the specified ForecastDefinition associated with the Cube.
Parameters:
name - The name of the ForecastDefinition to find.
Returns:
The specified ForecastDefinition.

Oracle® OLAP Analytic Workspace Java API Reference
10g Release 2 (10.2)

B14351-02

Copyright © 2003, 2005 Oracle. All rights reserved.